import 'package:flutter_axrjc/datasource/network/bean/QianDaoListBean.dart';
import 'package:flutter_axrjc/datasource/network/bean/QianDaoResBean.dart';
import 'package:flutter_axrjc/datasource/network/request/network_service.dart';

class QianDaoApi {
  static Future<QianDaoResBean?> qiandao(String integral) async {
    var res = await NetworkService.post(
        url: 'app/proBaseCustomerSignSave.do',
        map: {"integral": integral},
        showLoading: false);
    return res.getTypedData((map) => QianDaoResBean.fromJson(map));
  }

//签到奖励积分和连续奖励积分
  static Future<List<QianDaoListBean>> proSysCodeQuery() async {
    var res = await NetworkService.post(
        url: "app/listUserSigns.do", map: {}, showLoading: false);
    return res.getTypedList<QianDaoListBean>(
            (map) => QianDaoListBean.fromJson(map)) ??
        [];
  }
}
